require 'prime'

puts"Enter n: "
n = gets().to_i
n -= 1
puts"List of prime power (<#{n}): "
while n > 1 do
  if  n.prime_division.length == 1 
    printf("%i   ", n)
  end
  n -= 1
end 